package com.ayu.shortlink.settlement.service;

import com.ayu.shortlink.settlement.dao.entity.OrderDO;
import com.ayu.shortlink.settlement.dto.req.OrderCreateReqDTO;
import com.ayu.shortlink.settlement.dto.req.OrderPageQueryReqDTO;
import com.ayu.shortlink.settlement.dto.resp.OrderCreateRespDTO;
import com.ayu.shortlink.settlement.dto.resp.OrderPageQueryRespDTO;
import com.ayu.shortlink.settlement.dto.resp.OrderQueryRespDTO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

public interface OrderService extends IService<OrderDO> {
    /**
     * 创建用户订单
     * @param requestParam 请求参数
     */
    OrderCreateRespDTO createOrder(OrderCreateReqDTO requestParam);

    /**
     * 查询用户订单
     * @param orderSn 订单号
     * @return 用户订单
     */
    OrderQueryRespDTO queryByOrderSn(String orderSn);

    /**
     * 分页查询用户订单
     * @param requestParam 请求参数
     * @return 分页参数
     */
    IPage<OrderPageQueryRespDTO> pageQuery(OrderPageQueryReqDTO requestParam);

    /**
     * 取消订单
     * @param orderSn 订单号
     */
    void cancelOrder(String orderSn);
}
